//
//  COPresentAnimationDelegate.swift
//  COmix
//
//  Created by Ruthless on 2023/8/16.
//

import UIKit

class COPresentAnimationDelegate: NSObject {
    let animation = COPresentAnimation()
}

extension COPresentAnimationDelegate: UIViewControllerTransitioningDelegate {
    public func animationController(forDismissed dismissed: UIViewController) -> UIViewControllerAnimatedTransitioning? {
        animation
    }
    
    public func animationController(forPresented presented: UIViewController, presenting: UIViewController, source: UIViewController) -> UIViewControllerAnimatedTransitioning? {
        animation
    }
    
    public func presentationController(forPresented presented: UIViewController, presenting: UIViewController?, source: UIViewController) -> UIPresentationController? {
        let v = COPresentAnimtaionControllerViewController.init(presentedViewController: presented, presenting: presenting)
        return v
    }
}
